package com.tuyan.aixiang.api.module;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.tuyan.aixiang.common.M;
import com.tuyan.aixiang.model.Optional;
import com.tuyan.aixiang.model.Result;
import com.tuyan.aixiang.model.UserInfo;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.HEAD;
import retrofit2.http.POST;

public interface Account {

    /**
     * 登录
     * @param  {
     *       "dr_login_account":"xxxxxx",
     *       "dr_login_pass":"xxxxxxxxxx"
     *   }
     * @return UserInfo
     */
    @POST("/v1/p/dr/login")
    Observable<Result<JsonElement>> login(@Body M m);

    /**
     * 登出
     * @return ignore
     */
    @POST("/v1/p/dr/logout")
    Observable<Result<Optional>> logout();
}
